package com.paranoidmonkey.ode;

public class Mass extends ODEObject {
	
	public Mass(){
		handle=AndrODE.dMassCreate();
	}
	public void destroy(){
		AndrODE.dMassDestroy(handle);
	}
	public int check(){
		return AndrODE.dMassCheck(handle);
	}
	public void setZero(){
		AndrODE.dMassSetZero(handle);
	}
	public void setParameters(float themass, float cgx, float cgy, float cgz, float I11, float I22, float I33, float I12, float I13, float I23){
		AndrODE.dMassSetParameters (handle, themass, cgx, cgy, cgz, I11, I22, I33, I12, I13, I23);
	}
	public void setSphere(float density, float radius){
		AndrODE.dMassSetSphere (handle, density, radius);
	}
	public void setSphereTotal(float total_mass, float radius){
		AndrODE.dMassSetSphereTotal (handle, total_mass, radius);
	}
	public void setCapsule(float density, int direction, float radius, float length){
		AndrODE.dMassSetCapsule (handle, density, direction, radius, length);
	}
	public void setCapsuleTotal(float total_mass, int direction, float radius, float length){
		AndrODE.dMassSetCapsuleTotal (handle, total_mass, direction, radius, length);
	}
	public void setCylinder(float density, int direction, float radius, float length){
		AndrODE.dMassSetCylinder (handle, density, direction, radius, length);
	}
	public void setCylinderTotal(float total_mass, int direction, float radius, float length){
		AndrODE.dMassSetCylinderTotal (handle, total_mass, direction, radius, length);
	}
	public void setBox(float density, float lx, float ly, float lz){
		AndrODE.dMassSetBox (handle, density, lx, ly, lz);
	}
	public void setBoxTotal(float total_mass, float lx, float ly, float lz){
		AndrODE.dMassSetBoxTotal (handle, total_mass, lx, ly, lz);
	}
	public void setTriMesh(float density, Geom geom){
		AndrODE.dMassSetTrimesh (handle, density, geom.handle);
	}
	public void setTriMeshTotal(float total_mass, Geom geom){
		AndrODE.dMassSetTrimeshTotal (handle, total_mass, geom.handle);
	}
	public void adjust(float newmass){
		AndrODE.dMassAdjust (handle, newmass);
	}
	public void translate(float x, float y, float z){
		AndrODE.dMassTranslate (handle, x, y, z);
	}
	public void rotate(float[] R){
		AndrODE.dMassRotate (handle, R);
	}
	public void add(Mass a,Mass b){
		AndrODE.dMassAdd (a.handle, b.handle);
	}

}
